<!-- addEditItem.html 2018-07-05 14:09:40-->
<div class="ibox">
	<div class="ibox-title">
		<h5>菜单项编辑</h5>
		<div class="pull-right">
			#if(menuItem.id) <a href="javascript:" style="font-size:12px;color:#666" onclick="add(#(menuItem.id))">新增子菜单</a>  
			<a href="javascript:" style="font-size:12px;color:#666" onclick="add(#(menuItem.parent_id))">新增同级菜单</a>  #end
   		<a href="javascript:" style="font-size:12px;color:#666" onclick="closeEdit()">关闭</a>
    </div>
	</div>
	<div class="ibox-content">
		<form id="form" class="form-horizontal required-validate" method="post" action="saveItem" novalidate="novalidate" onsubmit="return validateCallback(this,thisAjaxDone)">
			<input type="hidden" name="menuItem.id" value="#(menuItem.id)"/>
			<input type="hidden" name="menuItem.parent_id" value="#(menuItem.parent_id)"/>
			<input type="hidden" name="menuItem.group_id" value="#(menuItem.group_id)"/>
			<div class="form-group">
		   	<label class="col-xs-2 control-label">上级菜单：</label>
		     <div class="col-xs-9" style="line-height: 35px">
		     #if(parentItem)#(parentItem.name)#else无#end
		     </div>
		  </div>	
		  <div class="form-group">
				<label class="col-xs-2 control-label">名称：</label>
				<div class="col-xs-9">
	<input type="text" class="form-control required" name="menuItem.name" value="#(menuItem.name)"/>
				</div>
			</div>			
						<div class="form-group">
				<label class="col-xs-2 control-label">菜单类型：</label>
				<div class="col-xs-9">
	<select name="menuItem.type" class="form-control required">
		
		#(data("WEIXIN_MENU_ITEM_TYPE","option",menuItem.type))
	</select>
				</div>
			</div>		<div class="form-group">
				<label class="col-xs-2 control-label">内容：</label>
				<div class="col-xs-9">
	<textarea name="menuItem.content" class="form-control">#(menuItem.content)</textarea>
					<p style="padding-top: 10px;"><span style="color:red">根菜单</span>：留空不填，一级菜单专用；</p>
					<p><span style="color:red">点击事件</span>：请填写事件值；</p>
					<p><span style="color:red">跳转链接</span>：请填写链接网址；</p>
					<p><span style="color:red">发送素材</span>：请填写素材media_id，具体可进入“永久素材管理”查看；</p>
					<p><span style="color:red">跳转图文链接</span>：请填写图文素材media_id，具体可进入“永久素材管理”查看；</p>
				</div>
			</div>	
			
					<div class="form-group">
				<label class="col-xs-2 control-label">排序：</label>
				<div class="col-xs-9">
		<input type="number" class="form-control digits required" name="menuItem.sort" value="#(menuItem.sort??"100")"/>
				</div>
			</div>		  <div class="form-group">
		   	<div class="col-xs-9 col-xs-offset-2">
		     	<button type="submit" class="btn btn-primary">保存</button>
		     	#if(menuItem.id)
		     		  <a class="btn btn-danger" href="deleteItem?id=#(menuItem.id)" target="ajaxTodo" title="确定删除吗？" callback="deleteAjaxTodo">删除</a>
		     	#end
		    </div>
		  </div>
		</form>
 	</div>
</div>
